﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.Data.Mapping {
    public partial class ProductActivityTimeBuyMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<ProductActivityTimeBuy> {
        public ProductActivityTimeBuyMap() {
            ToTable("mc_ProductActivityTimeBuy", "dbo");

            HasKey(t => t.ProductActivityId);
            Property(t => t.ProductActivityId)
                .HasColumnName("ProductActivityId")
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None)
                .IsRequired();

            HasRequired(t => t.ProductActivity)
                .WithOptional(t => t.ProductActivityTimeBuy)
                .WillCascadeOnDelete(false);

        }
    }
}
